package com.geek.javase.ch03;

/**
 * @author chenshupeng
 * @date 2025/9/2
 * @desc TODO
 **/

public class Teacher {
    private String name;
    private char gender;
    private int age;
    private String toughtMajor;//授课专业

    public Teacher(String name,char gender,int age,String toughtMajor)
    {
        this.name=name;
        this.age=age;
        this.gender=gender;
        this.toughtMajor=toughtMajor;
    }

    public Teacher() {
    }

    /**
     * 获取
     * @return name
     */
    public String getName() {
        return name;
    }

    /**
     * 设置
     * @param name
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 获取
     * @return gender
     */
    public char getGender() {
        return gender;
    }

    /**
     * 设置
     * @param gender
     */
    public void setGender(char gender) {
        this.gender = gender;
    }

    /**
     * 获取
     * @return age
     */
    public int getAge() {
        return age;
    }

    /**
     * 设置
     * @param age
     */
    public void setAge(int age) {
        this.age = age;
    }

    /**
     * 获取
     * @return toughtMajor
     */
    public String getToughtMajor() {
        return toughtMajor;
    }

    /**
     * 设置
     * @param toughtMajor
     */
    public void setToughtMajor(String toughtMajor) {
        this.toughtMajor = toughtMajor;
    }

    public String toString() {
        return "Teacher{name = " + name + ", gender = " + gender + ", age = " + age + ", toughtMajor = " + toughtMajor + "}";
    }
    public void Eat()
    {
        System.out.println("老师吃饭");
    }
    public void Sleep()
    {
        System.out.println("老师睡觉");
    }
}
